#Copyright (c) Facebook, Inc. and its affiliates.
#This source code is licensed under the MIT license found in the
#LICENSE file in the root directory of this source tree.

# For more information about using CMake

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.4.1)
project(fb_jpegturbo)
set(TOP_DIR ${CMAKE_CURRENT_LIST_DIR}/../)

# add_subdirectory(${TOP_DIR}/bitmaps bitmaps.out)
# add_subdirectory(${TOP_DIR}/libjpeg-turbo-1.5.3 libjpeg-turbo-1.5.3.out)

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.

add_library( # Sets the name of the library.
             fb_jpegturbo

             # Sets the library as a shared library.
             SHARED

             # Provides a relative path to your source file(s).
	jcapimin.c jcapistd.c jccoefct.c jccolor.c
	jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c
	jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c
	jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c
	jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c
	jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c
	jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c
	jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c
	jaricom.c jcarith.c jdarith.c
	transupp.c jmemnobs.c jsimd_none.c)

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.

# find_library( # Sets the name of the path variable.
#              log-lib
#
#              # Specifies the name of the NDK library that
#              # you want CMake to locate.
#              log )

# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.